// index/statistics.js
import request from '@/utils/request'

// 获取统计概览数据
export function getStatisticsOverview() {
    return request({
        url: '/index/statistics/overview',
        method: 'get'
    })
}

// 获取成绩分布数据
export function getScoreDistribution(examId) {
    return request({
        url: '/index/statistics/scoreDistribution',
        method: 'get',
        params: { examId }
    })
}

// 获取科目成绩数据
export function getSubjectScores() {
    return request({
        url: '/index/statistics/subjectScores',
        method: 'get'
    })
}

// 获取考试参与情况
export function getExamParticipation() {
    return request({
        url: '/index/statistics/examParticipation',
        method: 'get'
    })
}

// 获取考试统计数据
export function getExamStats(startDate, endDate) {
    return request({
        url: '/index/statistics/examStats',
        method: 'get',
        params: { startDate, endDate }
    })
}